Libraryless. Click here for Pure Java version (7958L/44K).
static Color withAlpha(Color c, double alpha) { ret colorWithAlpha(c, alpha); } static Color withAlpha(double alpha, Color c) { ret colorWithAlpha(alpha, c); } static int withAlpha(double alpha, int rgb) { ret rgb & 0xFFFFFF | (iround(clampToZeroOne(alpha)*255) << 24); }
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
Snippet ID: | #1032090 |
Snippet name: | withAlpha - synonym of colorWithAlpha |
Eternal ID of this version: | #1032090/2 |
Text MD5: | 177f73bdb2af2cea5e66f4143168e897 |
Transpilation MD5: | 97ccfa2f96074e66cc739178812f50b7 |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-04-29 01:40:21 |
Source code size: | 293 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 186 / 274 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |