I've been using poc.convert.toInteger to convert hex to integer values. Now that some convert functions are discontinued or moved to cypher I'm missing this feature (though I've got a workaround).
with
['fc','fc','fc'] as rgb
return
{
r: apoc.convert.toInteger('0x' + rgb[0]),
g: apoc.convert.toInteger('0x' + rgb[1]),
b: apoc.convert.toInteger('0x' + rgb[2])
} as rgb
with
['fc','fc','fc'] as rgb
with
[
value in rgb |
reduce(
result = 0, char in split(toUpper(value),'') |
result * 16 +
case char
when 'F' then 15
when 'E' then 14
when 'D' then 13
when 'C' then 12
when 'B' then 11
when 'A' then 10
else toInteger(char)
end
)
] as rgb
return
{
r: rgb[0],
g: rgb[1],
b: rgb[2]
} as rgb