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

6
LINES

< > BotCompany Repo | #1029770 // addColors

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

Libraryless. Click here for Pure Java version (127L/1K).

static Color addColors(Color a, Color b) {
  ret new Color(
    (float) clipZeroToOne((a.getRed()+b.getRed())/255.0),
    (float) clipZeroToOne((a.getGreen()+b.getGreen())/255.0),
    (float) clipZeroToOne((a.getBlue()+b.getBlue())/255.0));
}

Author comment

Began life as a copy of #1007920

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1029770
Snippet name: addColors
Eternal ID of this version: #1029770/3
Text MD5: c0ec5e7b0cd86820b1dc8840c87d89ff
Transpilation MD5: f76badba93d5efb2a9e71b0c08354d3a
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-09-12 03:09:38
Source code size: 247 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 120 / 190
Version history: 2 change(s)
Referenced in: [show references]