A powerful conversion of [String] or/and Hash to HEX. It returns a unique HEX, or a unique int of [Color()] per provided String/hash. It's provided two methods [toHexString] and [toColor], which return a Hex-String, or integer of Color() respectively.
This package return hex-string or hex-int-color, check bellow:
Return a [int] of 'bit hex':
Its return is proper to use as hex [color int] in a Color()
For example: ... color: Color(StringToHex.toColor('a nice String')) ...
then it'll generate and fill a hex-color int in it.
return a hex-color.
i.e: 0xFF353535
or: 8787451701
you can use as:
var myNiceColor = StringToHex.toColor('your nice string');
...
color: Color(myNiceColor);
...
or:
...
color: Color(StringToHex.toColor('your nice string'));
...
Return a [String] of 'bit hex': Its return is proper to your custom manipulating (as you lik better ๐งโ๐ป).
Returns a String HEX with prefix '0xFF'
i.e: '0xFF343434'
This example app shows all implementations
App shot |
---|
![]() |
Have a Nice Code!