-
Notifications
You must be signed in to change notification settings - Fork 0
Create a function string_to_rgb that converts a string to RGB values. Assign each letter (a-z) a numeric value (a=1, b=2, ..., z=26). Multiply these values by factors (red=1, green=2, blue=3) and sum them. Return [0, 0, 0] if the string is empty or has non-alphabetic characters. Ensure each RGB component is within 0-255.
AgilanArulchelvam/Life-in-Pixels
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
About
Create a function string_to_rgb that converts a string to RGB values. Assign each letter (a-z) a numeric value (a=1, b=2, ..., z=26). Multiply these values by factors (red=1, green=2, blue=3) and sum them. Return [0, 0, 0] if the string is empty or has non-alphabetic characters. Ensure each RGB component is within 0-255.
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published