FineFindus / eyedropper

Pick and format colors
https://apps.gnome.org/Eyedropper
GNU General Public License v3.0
268 stars 28 forks source link

Support RAL and FS595C color formats #180

Open jbingram opened 6 hours ago

jbingram commented 6 hours ago

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

  1. 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

  1. 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:

$$ \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} } $$

  1. 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

FineFindus commented 4 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 :)

jbingram commented 1 hour ago

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:

  1. Pantone Matching System (PMS)

    • Scope: Global
    • Industries: Printing, fashion, textiles, plastics, and graphic design.
    • Details: Pantone is a standardized color matching system widely used in design and manufacturing. Unlike RAL, Pantone focuses on the precise reproduction of colors in printed and digital materials, making it popular in branding and marketing.
  2. FS595C (Federal Standard 595)

    • Scope: Primarily North America, especially the USA.
    • Industries: Government, defense, aerospace, and industrial coatings.
    • Details: Developed by the U.S. federal government, FS595C is a color standard widely used for military equipment, vehicles, and infrastructure.
  3. NCS (Natural Color System)

    • Scope: Europe, with global recognition.
    • Industries: Architecture, interior design, and industrial manufacturing.
    • Details: NCS is a scientifically based system that describes colors according to human perception, making it a popular choice for design and paint applications.
  4. Munsell Color System

    • Scope: Global, particularly in scientific and educational contexts.
    • Industries: Agriculture, archaeology, and soil science, as well as art and design.
    • Details: The Munsell system organizes colors based on three attributes: hue, value (lightness), and chroma (saturation). It's widely used in specialized industries for its precise color classification.
  5. British Standard (BS) Colors

    • Scope: United Kingdom and Commonwealth countries.
    • Industries: Architecture, industrial design, and historical preservation.
    • Details: This system includes specific color references used in engineering, construction, and design. BS colors are often employed in projects requiring adherence to UK standards.
  6. Japanese Industrial Standard (JIS) Z8721

  7. CSIRO (Australian Standard AS 2700)

    • Scope: Australia
    • Industries: Construction, industrial manufacturing, and paint.
    • Details: This standard provides a range of color references for Australian industries, tailored to local conditions and preferences.
  8. Coloro

    • Scope: Emerging globally, with a focus on innovation.
    • Industries: Fashion, textiles, and product design.
    • Details: A modern color system developed to simplify the selection process and enhance digital compatibility, increasingly adopted by trend-conscious industries.