Ocl hex to dec
let parts='#e66465'.tolower.ToCharArray->collect(c|'#123456789abcdef'->tochararray->indexof0(c)) in(
  (parts.at0(1)*16+parts.at0(2))*256*256+
  (parts.at0(3)*16+parts.at0(4))*256+
  (parts.at0(5)*16+parts.at0(6))
)

Convert hex to rgb color:

let parts='#e66465'.tolower.ToCharArray->collect(c|'#123456789abcdef'->tochararray->indexof0(c)) in
(
(parts.at0(1)*16+parts.at0(2)).ToString()+','+
(parts.at0(3)*16+parts.at0(4)).ToString()+','+
(parts.at0(5)*16+parts.at0(6)).ToString()
)
This page was edited 150 days ago on 06/17/2024. What links here