如何找到两种颜色之间的所有颜色?

编程入门 行业动态 更新时间:2024-10-10 01:19:21
本文介绍了如何找到两种颜色之间的所有颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我需要选择两种颜色,然后在它们之间找到X颜色(或色调),每种颜色与另一种颜色相同。

I need to pick two colors, then find X colors (or tones) between them, each one separated with the same 'distance' of the other.

I仍然不明白颜色是如何形成的。我应该尝试使用HSV,RGB还是十六进制?

I still don't understand how colors are formed. Should I try using HSV, RGB, or hex?

推荐答案

除非你真的知道 kind 你需要哪些颜色,这几乎不可能在两种颜色之间获得所有颜色。

Unless you really know what kind of colors do you need, this is almost impossible to get all the colors between two colors.

只要看看颜色的表示 - 那里是这样颜色的轮子:

Just look at the representations of the colors - there are wheels with colors like that:

您可以在某条直线上选择颜色,顺时针或逆时针,您会得到不同的结果。

and you can pick colors on some straight line, going clockwise or counter-clockwise and you will get different results.

在RGB颜色的情况下,它们的数量是有限的并且等于16 777 216(245 ^ 3)。但你真的想要挑选所有这些颜色吗?选择一种方法来区分两种颜色之间的颜色,然后只需应用它并找到这些中间颜色。在两种不同颜色之间选择颜色没有单一且唯一的最佳方法。

In case of RGB colors, their number is limites and is equal to 16 777 216 (245^3). But do you really want to pick all of these colors? Choose a method to distinguish colors "between" two other colors and then just apply it and find these intermediate colors. There is no "single and only" best method to pick colors 'between' two different colors.

编辑:

或者,您可以使用色差概念并且选择比这两种基色更接近的所有颜色都比这些基色更接近。但我会给你所有的计算。

Alternatively, you can just make use of Color Difference concept and pick all the colors that are closer to both base colors than these base colors are close to each other. But I will leave you all the calculations.

更多推荐

如何找到两种颜色之间的所有颜色?

本文发布于:2023-11-28 21:54:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1644072.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:颜色   两种

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!