-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Is your feature request related to a problem? Please describe.
Add options for color code systems like RAL (standard in Europe), Federal Standard 595C colour range (standard in the US)
Describe the solution you'd like
- Set a database of correspondance between codes: RAL or FS595C <-> RGB or HEX or CIELAB
The model of conversion could be based e.g. on CIELAB -> RAL (Classic or design ...) using this website: https://convertingcolors.com/ral-colors.html
- Color Matching Algorithms:
Color conversion between systems like RGB/HEX and RAL or FS595C is typically done through color-matching algorithms, which compare the input color to a database of standard colors and return the closest match. This can be achieved by:
- Euclidean Distance in Color Space: Calculate the distance between the input color in RGB or another color space (e.g., Lab) and the colors in the RAL or FS595C database. Formula for Euclidean distance in RGB:
- More accurate matches are obtained using the CIE Lab color space (that Eyedropper already provides), as it models human perception better:
Delta E (CIEDE2000): A perceptual metric used for assessing color differences, which is more complex but provides more reliable results than Euclidean distance:
- There are software tools and APIs available for this task:
Open-source libraries: Some libraries in Python (e.g., colormath, Pillow) can help convert colors between RGB, Lab, and other spaces, making it easier to calculate the nearest match.
Describe alternatives you've considered
#NA
Additional context
#NA