4 ms·
Not that these do the same thing, but if you'd like, I wrote this proc in tcl/tk a couple of days ago if anyone wants to compare this site to tk's internals.
by monetus 6y ago
Not that these do the same thing, but if you'd like, I wrote this proc in tcl/tk a couple of days ago if anyone wants to compare this site to tk's internals.
proc color_name_to_hex {name} {
set hex "#"
foreach color [winfo rgb . "$name"] {
append hex [string range [format %02x $color] 0 1]
}
return $hex
}