Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Programmable colors: bridging design and code @...

Avatar for Irina Nazarova Irina Nazarova
June 23, 2025
9

Programmable colors: bridging design and code @ Figma Confir 2025

by Irina Nazarova and Arthur Objartel from Evil Martians

Avatar for Irina Nazarova

Irina Nazarova

June 23, 2025
Tweet

More Decks by Irina Nazarova

Transcript

  1. Irina Nazarova CEO Evil Martians Inc. she/her Arthur Objartel Product

    Designer Evil Martians Inc. he/him Programmable colors: bridging design and code
  2. Can you spot the difference? Use P3 color space to

    access extra vibrant and deep colors unavailable with HEX #ff0000 color(display-p3 1 0 0)
  3. What if? What if we simply need better tools to

    use color safely? What if we give you these tools today and see what happens?
  4. How do we think about color? Make it a little

    lighter Increase saturation Nudge it to violet
  5. ok ch( l 0.6 ok ch( l 0.8 +0.2 =

    more white Lightness ok ch( l 0.4 -0.2 = more black L for Lightness, from 0 to 1
  6. okl h( c 0.20 +5 = more orange okl h(

    c 0.15 Chroma okl h( c 0.05 -5 = less orange C for Chroma, from 0 to 1
  7. oklc ( h 120) +80 = green oklc ( h

    40) Hue oklc ( h 0) -40 = pink H for Hue, from 0 to 320
  8. Color accessibility OKLCH HEX Primary Button Primary Button Primary Button

    Primary Button oklch(0.5 0.26 300) #8368d6 oklch(0.5 0.26 135) #A4EA00 LOW CONTRAST
  9. :root .button:hover { ( ); } { (from ( )


    (l + ) h); } --base-color: --button-color: --base-color oklch oklch var calc 0.6 0.2 260 0.1 c Color formulas calc(l + ) 0.1
  10. :root .button:hover { ( ); } { (from ( )


    (l + ) h); } --base-color: --button-color: --base-color oklch oklch var calc 0.6 0.2 260 0.1 c Color formulas calc(l + ) 0.1
  11. P3 color space 50% more colors All colors
 human eye


    can see sRGB color space P3 color space
  12. Future proof: Rec2020 and other new tech Rec2020 All colors


    human eye
 can see P3 color space sRGB color space 76% more colors
  13. All browsers! Chrome 133 Edge 133 Safari 18.3 Firefox 135

    Chrome
 for
 Android 133 Safari on
 iOS 18.3 Samsung
 Internet 27 Opera
 Mobile 80 Android browser 133
  14. You can use P3
 and OKLCH in Figma! You can

    put OKLCH
 in color picker! Select Display P3 in Figma
  15. Primary Button Primary Button Primary Button Button Danger Button Danger

    Button Danger Button Success Button Success Button Success Primary Hover Pressed
  16. Primary Button Primary Button Primary Button Button Danger Button Danger

    Button Danger Button Success Button Success Button Success Primary Hover Pressed
  17. #programmablecolor We all have examples of great use of color!

    Join us in sharing ideas and examples on X, Bluesky and other socials! Thank you!