用于定义不同区域的随机颜色 [英] Random Colors For Use In Defining Different Regions

查看:57
本文介绍了用于定义不同区域的随机颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我想知道是否有人可以发布几行代码来生成随机颜色,这将用于定义不同地区

在网格上。所以除了有n种随机颜色外,我觉得还有一些条件可以确保它们在

外观上不太相似,因为那是可能在2-20之间说。


任何帮助非常感谢,


Adam

Hi All,

I was wondering if somebody could post a few lines of code which would
produce random colors, which will be used in defining different regions
on a mesh. So in addition to having n random colors, I feel that there
should also be some condition to ensure that they aren''t too similar in
appearance, given that is likely to range from 2-20 say.

Any help much appreciated,

Adam

推荐答案

Adam Hartshorne写道:
Adam Hartshorne wrote:
大家好,

我想知道是否有人可以发布几行代码
产生随机颜色,用于定义网格上的不同区域。所以除了有n种随机颜色外,我觉得还应该有一些条件来确保它们在外观上不太相似,因为它可能在2到20之间。

任何帮助非常感谢,

亚当
Hi All,

I was wondering if somebody could post a few lines of code which would
produce random colors, which will be used in defining different regions
on a mesh. So in addition to having n random colors, I feel that there
should also be some condition to ensure that they aren''t too similar in
appearance, given that is likely to range from 2-20 say.

Any help much appreciated,

Adam




我应该添加我也在寻找能够限制

颜色的范围。说避免黑色或白色等。


Adam



I should have added I''m also looking to be able limit the range of the
colors as well. Say to avoid ever having black or white etc.

Adam


Adam Hartshorne写道:
Adam Hartshorne wrote:
大家好,

我想知道是否有人可以发布几行代码来生成随机颜色,这些代码将用于定义网格上的不同区域。所以除了有n种随机颜色外,我觉得还应该有一些条件来确保它们在外观上不太相似,因为它可能在2到20之间。

任何帮助非常感谢,

亚当
Hi All,

I was wondering if somebody could post a few lines of code which would
produce random colors, which will be used in defining different regions
on a mesh. So in addition to having n random colors, I feel that there
should also be some condition to ensure that they aren''t too similar in
appearance, given that is likely to range from 2-20 say.

Any help much appreciated,

Adam




我想我应该说我明显知道如何产生3个随机的

数字以插入RGB,但我正在寻找比这更明智的

安排。


另外,我应该补充一下,我也希望能够限制颜色的范围

。说避免黑色或白色等。


Adam



I think I should have said I obviously know how to produce 3 random
numbers to plug into RGB, but I was looking for a more sensible
arrangement than this.

Also, I should have added I''m also looking to be able limit the range of
the colors as well. Say to avoid ever having black or white etc.

Adam


Adam Hartshorne写道:
Adam Hartshorne wrote:
大家好,

我想知道是否有人可以发布几行代码来生成随机颜色,这些代码将用于定义网格上的不同区域。所以除了有n种随机颜色外,我觉得还应该有一些条件来确保它们在外观上不太相似,因为它可能在2到20之间。

任何帮助非常感谢,

亚当
Hi All,

I was wondering if somebody could post a few lines of code which would
produce random colors, which will be used in defining different regions
on a mesh. So in addition to having n random colors, I feel that there
should also be some condition to ensure that they aren''t too similar in
appearance, given that is likely to range from 2-20 say.

Any help much appreciated,

Adam




我想我应该说我明显知道如何产生3个随机的

数字以插入RGB,但我正在寻找比这更明智的

安排。


另外,我应该补充一下,我也希望能够限制颜色的范围

。说避免黑色或白色等。


亚当



I think I should have said I obviously know how to produce 3 random
numbers to plug into RGB, but I was looking for a more sensible
arrangement than this.

Also, I should have added I''m also looking to be able limit the range of
the colors as well. Say to avoid ever having black or white etc.

Adam


这篇关于用于定义不同区域的随机颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆