Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

4
LINES

< > BotCompany Repo | #1014539 // awtColor - Color from hex. TODO: shortened version with 3 chars

JavaX fragment (include)

static java.awt.Color awtColor(S hex) {
  byte[] b = bytesFromHex(dropPrefix("#", hex));
  ret new Color(ubyteToInt(b[0]), ubyteToInt(b[1]), ubyteToInt(b[2]));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1014539
Snippet name: awtColor - Color from hex. TODO: shortened version with 3 chars
Eternal ID of this version: #1014539/3
Text MD5: d0c7f8be3b34585a9e147b57bd33436d
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-09-17 12:26:45
Source code size: 164 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 411 / 536
Version history: 2 change(s)
Referenced in: [show references]