Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
スケールRGB colors (0 - 255)するために0いくつかを計算しようとしています。1オンラインコンバーターを知っている人はいますか、それとも数式がありますか?
RGB colors
(0 - 255)
0
1
(0から255のスケール)の125RGBを0から1のスケールに変換したいとしましょう。
xこれは、RGB値を255で割った場合です。
x
その場合x = 95、値は95/255 = 0.373(3 dpまで)です。
x = 95
95/255 = 0.373
a = x / 255
また
x = a * 255
ここxで、はRGB値であり、aは目的の結果です。
a