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

4
LINES

< > BotCompany Repo | #1033727 // grayToColor

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

Libraryless. Click here for Pure Java version (4794L/27K).

1  
// f: 0 to 1
2  
static Color grayToColor(double f) {
3  
  ret toColor(brightnessToRGBA(iceil(f*256)));
4  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033727
Snippet name: grayToColor
Eternal ID of this version: #1033727/2
Text MD5: ec32e0d5df963a63b0865289b57f4f2f
Transpilation MD5: a87362dee5ae5d167b378b7173a8eb45
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-12-30 22:07:50
Source code size: 101 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 152 / 226
Version history: 1 change(s)
Referenced in: [show references]