Libraryless. Click here for Pure Java version (73L/1K).
static Color withOpacity(Color c, double alpha) { ret colorWithAlpha(c, alpha); } static Color withOpacity(double alpha, Color c) { ret colorWithAlpha(alpha, c); } // opacity = 0 to 255 static int withOpacity(int opacity, int rgb) { ret (opacity << 24) | (rgb & 0xFFFFFF); }
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033813 |
Snippet name: | withOpacity - extended synonym of colorWithAlpha |
Eternal ID of this version: | #1033813/3 |
Text MD5: | 9921b7d4e54c74939ff429b9e4acffc2 |
Transpilation MD5: | f308e92926b3add840b3cfd1fb416df4 |
Author: | someone |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-07-17 19:02:58 |
Source code size: | 297 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 163 / 240 |
Version history: | 2 change(s) |
Referenced in: | [show references] |