RGB or Hex Color Codes from Config

Discussion in 'Plugin Development' started by MasterDoctor, Jan 10, 2016.

Thread Status:
Not open for further replies.
  1. Offline


    I have been hunting around for the past 30 minutes and I am unable to find anything on how to get an RGB or Hex color code from my config, Any ideas?
  2. Offline


    Can you explain why you're trying to get these colors?

    For RGB all you really need to do is save three ints, then load them.
    And for Hex it's just a string without the #
  3. Offline


    I thought so, its for armor color.
    I tried the string for hex but how am I actually meant to set that as an armor color?
  4. Offline


    Well you can set the Armor color with

    And you can get a color from rgb with
    Color.fromRGB(int, int, int);
    And you can get the int of a hex string with

    So get the int of the red, green and blue then get the color from it and set the armor as such. Remember to only check the first two characters, then the second two and then third, otherwise the int will be out of it's bounds.
  5. Offline


Thread Status:
Not open for further replies.

Share This Page