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

17
LINES

< > BotCompany Repo | #1014940 - toColor

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (3292L) is out of date.

ifclass RGB
static Color toColor(RGB rgb) {
  ret rgb == null ? null : rgb.getColor();
}
endif

static Color toColor(int rgb) {
  ret new Color(rgb);
}

static Color toColor(S hex) {
  ret awtColor(hex);
}

static Color toColor(int[] rgb) {
  ret new Color(rgb[0], rgb[1], rgb[2]);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1014940
Snippet name: toColor
Eternal ID of this version: #1014940/5
Text MD5: f198220a96206b09e8c6d6c0fa764f27
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-09 19:48:15
Source code size: 299 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 304 / 355
Version history: 4 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1014940 & http://1014940.tinybrain.de