Open jbingram opened 6 hours ago
Thanks for the suggestion! Could you tell me a bit more about where these formats are used and how popular they are? I would like to avoid adding support for something that almost nobody uses :)
Thx for your reply. where these formats are used and how popular they are?
RAL has been used since the 1920s across Europe, North America, and now China as one of the most universal standards for color charts and reference cards. It is a NGO that only provides a color system and sells color charts. If you have the RAL code for a specific color, you—or a company—can easily buy, order, collaborate with any paint or color related business to create a custom mix tailored to your needs, whether for artwork, animation & comics, wall painting, fabric production, fashion industry, or other applications.
In contrast, digital color formats like RGB or HEX codes aren’t typically used in such contexts. Physical color standards like RAL serve as essential references for real-world applications, whereas digital charts are more aligned with the computer related tasks.
Given your app's capability to extract and translate color codes from web images and social media, it could further serve as a powerful open-source bridge between digital and physical color spaces. By integrating support for RAL (and potentially others like presented below), your app could connect the virtual and real-world design ecosystems seamlessly. It could be used by schools, industries, architects, or even the average Joe to create his own paint mix using the color code he extracted with your tool from the website he was browsing.
Although RAL is the historical and most widely used code system, here are supplementary option to consider:
Pantone Matching System (PMS)
FS595C (Federal Standard 595)
NCS (Natural Color System)
Munsell Color System
British Standard (BS) Colors
Japanese Industrial Standard (JIS) Z8721
CSIRO (Australian Standard AS 2700)
Coloro
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
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 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:
$$ \text{Distance}_{RGB} = \sqrt{(R_1 - R_2)^2 + (G_1 - G_2)^2 + (B_1 - B_2)^2} $$
$$ \Delta E_{76} = \sqrt{(L_1 - L_2)^2 + (a_1 - a_2)^2 + (b_1 - b_2)^2} $$
Delta E (CIEDE2000): A perceptual metric used for assessing color differences, which is more complex but provides more reliable results than Euclidean distance:
$$ \Delta E_{00} = \sqrt{ \left( \frac{\Delta L'}{k_L S_L} \right)^2 + \left( \frac{\Delta C'}{k_C S_C} \right)^2 + \left( \frac{\Delta H'}{k_H S_H} \right)^2 + R_T \frac{\Delta C'}{k_C S_C} \frac{\Delta H'}{k_H S_H} } $$
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