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 8023779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:39:53+00:00 2026-06-04T22:39:53+00:00

I have three projects Game – Java Project GameAndroid – Android GameDesktop – Java

  • 0

I have three projects

  1. Game – Java Project
  2. GameAndroid – Android
  3. GameDesktop – Java Project

I want to access android.graphics.Color, but I’m in my Game project which is java, so i can’t do that. When I try to access Java.awt.Color insted, i’ll get java.lang.NoClassDefFoundError insted.

Is there a way to access any of these libraries ?

for example i would like to use this method:

Color.getHSBColor();
  • 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-06-04T22:39:55+00:00Added an answer on June 4, 2026 at 10:39 pm

    I generally recommend using com.badlogic.gdx.graphics.Color instead.

    It has the advantage of being platform-agnostic – but do note the implementation differences between the analogues.

    For example, compare Android’s implementation (AWT’s works in the same fashion) :

    public static int argb(int alpha, int red, int green, int blue) {
        return (alpha << 24) | (red << 16) | (green << 8) | blue;
    }
    

    and the libgdx implementation:

    public static int toIntBits (int r, int g, int b, int a) {
         return (a << 24) | (b << 16) | (g << 8) | r;
    }
    

    As you can see, the ordering in the encoding is different. Here’s the source code
    for reference.

    If you’re looking for stuff such as HSB->RGB conversion, this can be implemented “manually”. See this answer, for example – but remember to use the libgdx implementation to generate the actual int from the RGB components!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have three projects 1)unmanaged c++ containing full business logic 2)C++/CLI ( Project name
I have three projects in my /rails directory: test_app/, dma4/ and test2_app/. I am
I have three projects written with VB.NET (2005) and have to convert them to
Suppose I have three projects in my sln. (1) xyz.a{Class Lib}{no reference added} (2)
I am creating solution and inside I have three projects: A WCF Service Library
The scope of this is that we have three main projects. Some of the
Using MySQL, I have three tables: projects : ID name 1 birthday party 2
Please click here for sample tables and description. I have three tables ‘PROJECTS’, 'PROJECTMANAGER'
Please click here for sample tables and description. I have three tables ‘PROJECTS’, 'PROJECTMANAGER'
In one of my iPhone projects, I have three views that you can move

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.