Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6166943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:25:39+00:00 2026-05-23T22:25:39+00:00

There are 3 integer values that makes up a RGB value, and also i

  • 0

There are 3 integer values that makes up a RGB value, and also i have the Alpha component value of the color. how do i set these 4 values to get the desired colour

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T22:25:40+00:00Added an answer on May 23, 2026 at 10:25 pm

    You can create a Color object (the values should either be ints between 0–255 or floats between 0f–1f:

    Color c = new Color(red, green, blue, alpha);
    

    If you want to paint an image with that color:

    BufferedImage image = new BufferedImage(300, 200, BufferedImage.TYPE_INT_ARGB);
    Graphics graphics = image.getGraphics(); 
    graphics.setColor(c);
    graphics.fillRect(50, 50, 100, 100);
    graphics.dispose();
    

    If you only want to set a pixel (color model must be ARGB):

    image.setRGB(50, 50, c.getRGB());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I noticed that the iPhone OS is pretty good about picking out Integer values
Lets assume i have a function that takes 32bit integer in, and returns random
I'm trying to create a dynamic QSlider that accepts a QVector of integer values
I have a table in SQLite: CREATE TABLE EventType ( [EventTypeID] INTEGER PRIMARY KEY,
Good Afternoon, I have a html aspx page that has many many div elements.
I am trying to generate an array with N integer values between 0 and
In one bit of code I'm working on, I need to pull a value
I have a scenario where I have several thousand instances of data. The data
I am attempting to get the string representation of an Android device's current WiFi
In my Rails app I have a fairly standard has_many relationship between two entities.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.