基于现有方案创建配色方案
我有一个基于黄色的配色方案,用于网站上的警告消息。它相当于一个略带橙色边框的盒子,填充有淡黄色。确切的颜色是:
FED626(边框)
FFF7C0(填充)
我想知道是否可以通过数学或算法以某种方式转换此方案,以提出一个蓝色版本,其中边框是与黄色“相同数量”的蓝色。这是可能的,还是我只是“把尾巴钉在驴子上”在调色板上以获得大致正确的颜色?
我问,因为我很希望能够动态计算这个,也许可以在 .less< 中实现一些东西/a>.
为了给您一个想法,我尝试交换这两个值的红色和蓝色值,并得出以下结果:
26D6FE(边框)
C0F7FF(填充)
这并不太难,但想想我是否想要粉红色的配色方案......:)
I have a colour scheme based around yellow, for warning messages on a website. It amounts to a slightly orange bordered box, with a pale yellow fill. The exact colours are:
FED626 (border)
FFF7C0 (fill)
I want to know if it's possible to convert this scheme mathematically or algorithmically somehow, to come up with a blue version where the border is the "same amount" of blue as this one is yellow. Is this possible, or do I just "pin the tail on the donkey" on a colour pallet to get roughly the right one?
I ask, because I'd quite like to be able to calculate this on the fly, to perhaps implement something in .less.
To give you an idea, I tried swopping the red and blue values on those two, and came up with this:
26D6FE (border)
C0F7FF (fill)
That wasn't too hard, but think about if I wanted a pink colour scheme... :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实际上,我刚刚阅读了维基百科上的 HSL 和 HSV 页面的部分内容,并意识到所有我需要做的是选择一种颜色,然后更改色相值以旋转到我想要的颜色。
简单,现在我是图形专家了!
Actually, I just read part of the the HSL and HSV page on Wikipedia, and realise that all I need to do is pick a colour, then change the Hue value to rotate to a colour I want.
Easy, now I'm a graphics expert!