틀:ColorToLum

위키백과, 우리 모두의 백과사전.
틀 설명문서[보기] [편집] [역사] [새로 고침]

웹 색상W3C 상대 휘도(luminance) 값으로 변환합니다. HTML 색상 이름이나 HSL, RGB, Hex 값 모두 사용할 수 있습니다.

사용법[편집]

  • {{ColorToLum|Lime}} → 0.7152
  • {{ColorToLum|hsl(120,100%,50%)}} → 0.7152
  • {{ColorToLum|#00FF00}} → 0.7152
  • {{ColorToLum|rgb(0,255,0)}} → 0.7152
  • {{ColorToLum|rgb(0.0%,100.0%,0.0%)}} → 0.7152

확인[편집]

색상 변환된 상대 휘도
이름 HSL Hex RGB RGB%
Black 0 0 0 0 0
White 1 1 1 1 1
Red 0.2126 0.2126 0.2126 0.2126 0.2126
Lime 0.7152 0.7152 0.7152 0.7152 0.7152
Blue 0.0722 0.0722 0.0722 0.0722 0.0722
Yellow 0.9278 0.9278 0.9278 0.9278 0.9278
Cyan 0.7874 0.7874 0.7874 0.7874 0.7874
Magenta 0.2848 0.2848 0.2848 0.2848 0.2848
Silver 0.52711512570581 0.52720723642853 0.52711512570581 0.52711512570581 0.52720723642853
Gray 0.2158605001139 0.21589697895456 0.2158605001139 0.2158605001139 0.21589697895456
Maroon 0.045891942324215 0.045899697725739 0.045891942324215 0.045891942324215 0.045899697725739
Olive 0.20027537200568 0.20030921707404 0.20027537200568 0.20027537200568 0.20030921707404
Green 0.15438342968146 0.1544095193483 0.15438342968146 0.15438342968146 0.1544095193483
Purple 0.061477070432439 0.061487459606258 0.061477070432439 0.061477070432439 0.061487459606258
Teal 0.16996855778968 0.16999728122882 0.16996855778968 0.16996855778968 0.16999728122882
Navy 0.015585128108224 0.015587761880519 0.015585128108224 0.015585128108224 0.015587761880519