问题描述
是否有一个网络应用程序可以计算两种颜色之间的关系?
Is there a web app that could compute the relationship between two colors?
我有一个已建立十六进制值的现有样式指南。我想将这些颜色添加为sass变量中的hsla值。我可以将每个颜色添加为一个自变量,但我宁愿将所有颜色都基于一种基本颜色。然后使用变化百分比确定其他颜色。通过这样做,我可以使主题变色并在关系中保持正确的值。
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.
推荐答案
也许有点晚,但是我在搜索完全相同的功能时发现了这一点:
Maybe a bit late, but I found this while searching for the exact same functionality:
例如:
输入颜色#ff0000
和#552222
导致SASS函数 darken(desaturate(#ff0000,57),27)
For example:The input colors #ff0000
and #552222
result in the SASS function darken( desaturate( #ff0000, 57 ), 27 )
这篇关于计算颜色值关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!