Scale numbers to be <= 255?

前端 未结 13 2369
生来不讨喜
生来不讨喜 2021-02-05 18:39

I have cells for whom the numeric value can be anything between 0 and Integer.MAX_VALUE. I would like to color code these cells correspondingly.

If the val

13条回答
  •  Happy的楠姐
    2021-02-05 19:06

    Note that if you want brighter and brighter, that luminosity is not linear so a straight mapping from value to color will not give a good result.

    The Color class has a method to make a brighter color. Have a look at that.

提交回复
热议问题