Calculate color value relationship [closed]
Asked Answered
K

3

8

Is there a web app that could compute the relationship between two colors?

I have an existing style guide with established hex values. I would like to add these colors as hsla values in sass variables. I can add each one as an independent variable but I would rather base all the colors on one base color. Then use percentages of change to establish the other colors. In doing this I could color shift the theme and maintain the "correct" values in the relationships.

Kerbstone answered 10/12, 2012 at 19:41 Comment(0)
D
15

Maybe a bit late, but I found this while searching for the exact same functionality:

http://ethanmuller.github.io/sass-color-function-generator-thing/

For example: The input colors #ff0000 and #552222 result in the SASS function darken( desaturate( #ff0000, 57 ), 27 )

Dahna answered 29/4, 2015 at 18:46 Comment(1)
If you are looking for more than one suggestion for a function, the cuttle library (and site) lists different functions to choose from.Tactic
P
2

There's http://sassme.arc90.com/, which does the opposite of what you're asking for, but might be helpful.

Pieter answered 11/1, 2013 at 22:56 Comment(0)
K
1

What I ended up doing was getting the hsla value for all of the colors then manually doing the math for the percentage relations between two colors and using the results in the "adjust-color" function is sass. I am sure there is a faster way but this works.

Kerbstone answered 14/1, 2013 at 21:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.