基于现有方案创建配色方案

发布于 2024-08-31 02:59:26 字数 510 浏览 3 评论 0原文

我有一个基于黄色的配色方案,用于网站上的警告消息。它相当于一个略带橙色边框的盒子,填充有淡黄色。确切的颜色是:

  • 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

他是夢罘是命 2024-09-07 02:59:26

实际上,我刚刚阅读了维基百科上的 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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文