Get RGB from HTML color code.

 

 

TextColor ( "TEXT" ; GetRBG_FromHTMLColor ( "#2f4f4f" ) )

function(関数):
Sample input(入力例):
Sample output(出力例):
formula(式):

/*
HTMLColorCode="#2f4f4f" or "2f4f4f"
*/

Let([
_cc=Upper ( HTMLColorCode )
;_ccl=Substitute ( _cc
;[ "#" ; ""]
;[ "0"	 ;	 "0¶"]
;[ "1"	 ;	 "1¶"]
;[ "2"	 ;	 "2¶"]
;[ "3"	 ;	 "3¶"]
;[ "4"	 ;	 "4¶"]
;[ "5"	 ;	 "5¶"]
;[ "6"	 ;	 "6¶"]
;[ "7"	 ;	 "7¶"]
;[ "8"	 ;	 "8¶"]
;[ "9"	 ;	 "9¶"]
;[ "A"	 ;	 "10¶"]
;[ "B"	 ;	 "11¶"]
;[ "C"	 ;	 "12¶"]
;[ "D"	 ;	 "13¶"]
;[ "E"	 ;	 "14¶"]
;[ "F"	 ;	 "15¶"]
 )
;_R=(GetValue ( _ccl ; 1 )*16)+GetValue ( _ccl ; 2 )
;_G=(GetValue ( _ccl ; 3 )*16)+GetValue ( _ccl ; 4 )
;_B=(GetValue ( _ccl ; 5 )*16)+GetValue ( _ccl ; 6 )
];

RGB ( _R ; _G ; _B ) 

)