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 want to get a files these attributes as integer values.
I have 7 8-bit integer values per record that I want to store in
There is a table: doc_id(integer)-value(integer) Approximate 100.000 doc_id and 27.000.000 rows. Majority query on
Is there any java utility to convert string to hex value (integer) ?
Each of these variables has an integer value. But this syntax is not valid
I noticed that the iPhone OS is pretty good about picking out Integer values
I have some SIMD code in Altivec processing 32 bit integer values in parallel.
Is there a integer element for a cookie? I need the cookie to increment
For instance, there’s an integer column in a database table. Then in java model,
There is a table: create table table1 ( id integer primary key, user_id varchar(36),

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.