Jump to content
BIank

APB Color Converter

Recommended Posts

lrk37xh.png

 

As an avid user of social kiosks, I found myself utilizing a tool made by SKay to convert colors to their closest possible representation in APB HSL format.

 

Unfortunately the site has been down for a while, so I created a tool based off of the one which we all loved.

 

The tool is accessible by a direct URL here: apb.social/apbhsl

 

This can also be accessed on the main site in the navigation bar.

 

EJqJzfa.png

 

Instructions:



Click the BIG BOX to open a color picker.

 

You can manually choose a color, or input a value in the module.

 

Once a color is chosen, the APB HSL values will automatically adjust.

 

The in-game color will be reflected on the characters shirt.

 

Thank you to SKay who made the original below:

 

 

 

 

 

  • Like 7

Share this post


Link to post
Share on other sites
16 hours ago, InkieTheSauzeGod said:

Blank with another banger

Very kind words man, thank you so much.

  • Like 1

Share this post


Link to post
Share on other sites

The man that can literally make anything ^^ 

  • Like 1

Share this post


Link to post
Share on other sites

I approve of this.

 

I'll clean up the source code that I still have on hand and publish it on a GitHub or something tomorrow or Tuesday. Still works but the MEAN stack I was using is probably a year old at this point.

Actually wait:

Osj9D6K.png

I disapprove of this.

EDIT:

The original description is a load of wallop, so mindful of that, here's my updated description:

"The APB HSL System is a method of colour reproduction using a subset of the HSL colour reproduction standard

The standard HSL system is a representation of colour using Hue, Saturation and Lightness to achieve a specific colour. However, as the APB HSL system is a reduced value subset of standard HSL, the values are condensed down to bands of values, which means that true colour reproduction for most colours is just out of the question. Take for instance a greyscale image in your favourite image editor, and shrink and expand it several times (this mostly happens in Paint which does not retain sub-pixel data). You will see a lot of colour banding, and this is how APB HSL works.

Normally the HSL system can accept 3.6 million values for colour (360x100x100), however the APB system only accepts 4096 colours (This would be 32x8x16). This colour banding reduces the likelihood of 100% accurate colour reproduction to almost zero, due to the loss of 3+ million potential colour values. This can be circumvented by using opacity in game, but it would

be outside the scope for this tool.

The calculations are:

 

int[] calcHSL (int& colour)
{
	// Assume colour is 0xFFFFFF
  	return 	[
      			std::round(convert_to_hsl(*colour, "h") / (360/32)), // h
      			std::round(convert_to_hsl(*colour, "s") / (100/8)), // s
      			std::round(convert_to_hsl(*colour, "l") / (100/16)) // l
    		]
}

This allows for a massive reduction in the potential cost of texture memory being mapped and used (APB already is hitting a wall on the current engine with how much memory it can keep in use at one time). 4096/3600000 = 1.13% of the original footprint, or a potential memory saving of 98.87% from what it could be. However you lose fidelity in the amount of colours at your disposal, and it can lead to a fruitless search for one particular shade of pink, or purple, or red, or green. It can get close, but it can't ever truly get there."

Edited by SKay

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...