Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[CALLING ALL DEVS] Standardisation of API Plugin Colors

You're viewing a summary of the most helpful posts in this topic — about 11 minutes of reading instead of 28 minutes for all 47 posts.

Featured Replies

  • Popular Post

Okay, so following onto my previous thread, I, along with the other devs on LSPDFR are going to create a standardised list of colors for use on blips and routes in LSPDFR API development.

Devs, if you have a scenario that isn't covered by the list, please post below and I'll add it in. If you have any suggestions or ideas, please also post.

 

GPS BLIPS AND RADAR COLOURS


BLIP SIZES
Blips sizing should be as follows:

  • Vehicles: 1.0
  • Peds: 0.75

PEDS + VEHICLE BLIPS
Xp7z82U.png

ZONES

Primary search areas (prior to accepting a callout) (Drawing.Color.Yellow)

ROUTES
All routes should be Yellow (Drawing.Color.Yellow)


NOTIFICATIONS, HELP PROMPTS AND SUBTITLES

  • Ensure that all blips are the same colour as they are when highlighted in any on screen text. For example, suspects are red, and should be highlighted in text as red too.
  • Minimal colour should be used within on-screen text. Color should only be used to highlight key information or to highlight the colour of a particular person or object on the map. Examples:
Spoiler

"Dispatch any units available for...?"
"
Paramedics We're on route standby!"
"Tow Truck We're nearby. Hold on."
"A Representative from the Insurance Company is on the way."

  • Exactly the same should apply to subtitles at the bottom of the screen. Use color to only highlight the key information.

As plugins get updated to follow the above, we'll have a much more immersive plugin system that doesn't have strangely mismatched colours. 

 

@fiskey111, @Albo1125, @Straysify, @Stealth22, @alexguirre, @goigle, @Trinyx, @Darkmyre, @TitanSloth, @Patrinus, @w35, @DemNinjas, @LukeD, @Nutt, @Livia, @Luigi4518, @TheUniT, @Athsro

@FinKone, @DCP1293

 

Edited by AlconH
Added table for clarity.

  • Replies 46
  • Views 18.9k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • I definitely like this idea.  Maybe LSPDFR 0.4 (or whatever) can include this next round so it's only from the main plugin that all of ours require?  (Just an idea!)

  • It looks like they are darker shades of the colors that we picked...almost as if they took the "pure" colors, and turned down the opacity. The yellow and orange that R* selected look too close, IMO.

  • A nice idea, but generally speaking there are a few rules that GTA follows, and I personally try to stick as close to GTA blips and LSPDFR blips as possible. Perhaps incorporate this into your list.

Posted Images

A nice idea, but generally speaking there are a few rules that GTA follows, and I personally try to stick as close to GTA blips and LSPDFR blips as possible. Perhaps incorporate this into your list.

Yellow
• GTA
 - Primary objectives, search areas and route guidance.
• LSPDFR - Primary search areas (prior to accepting a callout)

Red
• GTA
 - Enemies or targets. (they use size to depict vehicles or peds)
• LSPDFR - Pursuit suspects. (combined with blue for flashing search area of pursuits (I think))

I wouldn't bother with multiple route guidance colours. Stick with yellow if going to a callout, it's cleaner to match GTA imo.

Also seeing as we're discussing colours and how they should be used....

Additional advice on the use of colours (this may be my personal taste here, take with a pinch of salt)
• Strip notifications of too much colour, highlighting a cop unit number or name is fine but the rest should be the same colour. I recommend using colour to highlight key info. eg. "Dispatch any units available for...?", "Paramedics We're on route standby!" etc. Especially if it's your callout start notification, they should be standardised with LSPDFR's.

• Try not to go overboard with colours in text overlays either (the subtitles for example). Again use them to highlight key info eg. "Ped", "Witness", "Cop", search the "area" for...

• Make sure blips correspond with colours used in any text. Eg. "look for the suspect at the place" in which the word suspect would match the blip he has. (this was common from LCPDFR)

 

And yes, I will be adopting the changes that come about from this thread when I have plenty of time to actively develop my plugins. Damn university sucks the life out of coding and gaming these days :/

Live Streaming daily from 8pm GMT (UK) at https://twitch.tv/OfficialLukeD - I play a variety of things 😄

Join my official discord server for support, general chat and my stream schedule! https://discord.gg/Mddj7PQ

Great idea, will definitely update Agency Callouts as soon as I have a chance.

On a somewhat related note, the latest version of Agency Callouts I've broken the officer profile (for my purposes this is officer name, and beat/division/unit codes) into a separate file from the rest of my settings. Been a bit busy to write up a post like the OP, but the general idea here was if we're all using something like this, referencing the one file, the user can simply set their officer details once, and have it apply to all callout plugins that use it... with the added advantage of not having to set it again as long as they dont copy over the myOfficer.ini (in my case) file again.

My YouTube Channel: Darkmyre Gaming (Australian LSPDFR patrols, plugins in development, and other games)

My Discord Server | AusGamer Network

 

Please do not PM me for technical support or bug reports, use the appropriate forum or plugin's comments instead.

22 minutes ago, Darkmyre said:

Great idea, will definitely update Agency Callouts as soon as I have a chance.

On a somewhat related note, the latest version of Agency Callouts I've broken the officer profile (for my purposes this is officer name, and beat/division/unit codes) into a separate file from the rest of my settings. Been a bit busy to write up a post like the OP, but the general idea here was if we're all using something like this, referencing the one file, the user can simply set their officer details once, and have it apply to all callout plugins that use it... with the added advantage of not having to set it again as long as they dont copy over the myOfficer.ini (in my case) file again.

I definitely like this idea.  Maybe LSPDFR 0.4 (or whatever) can include this next round so it's only from the main plugin that all of ours require?  (Just an idea!)

 

 

Yeah, it's not exact, but its close enough. Lime is a better match to ~g~ than Drawing.Color.Green anyway, lol.

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

Using the System.Drawing colors makes it a lot simpler though, especially when it comes to custom ped objects and such. We can leave it up to each dev, I guess, if someone prefers to use natives instead.

Edited by Stealth22

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

18 minutes ago, alexguirre said:

If everybody ends up using this, could we use the natives SET_BLIP_COLOUR and SET_BLIP_ROUTE_COLOUR? Example:
<snip>

 

5 minutes ago, Stealth22 said:

Using the System.Drawing colors makes it a lot simpler though, especially when it comes to custom ped objects and such. We can leave it up to each dev, I guess, if someone prefers to use natives instead.

I would actually recommend developers avoid using natives where possible. The benefit of the natives only comes in the form of RPH updates wont break them (like when methods become deprecated, plugins have to be updated).

At the gain of that 1 benefit you lose compiler errors, your code becomes a spew out of hashes (that occasionally change) or large obtrusive looking strings. You also limit and somewhat hinder your error outputting should the plugin crash because natives are determined during runtime.

And as stealth said, it's much simpler to use for everyone.

If RPH has a replacement for it (eg. myBlip.Color in this case) I really would recommend using it. Someone pretty competent at coding added that functionality into RPH, there is no point in reinventing the wheel or going back to basics.

Live Streaming daily from 8pm GMT (UK) at https://twitch.tv/OfficialLukeD - I play a variety of things 😄

Join my official discord server for support, general chat and my stream schedule! https://discord.gg/Mddj7PQ

I agree with @LukeD. I only use native functions when I absolutely have to. They are nearly impossible to debug if an exception gets thrown. Not saying that will happen with this, but for example, take something as simple as the "GET_VEHICLE_COLORS" native, I think its called. I had a weird StackOverflowException whenever I called that native, and the game would crash completely. Even if I put it in a Try/Catch block, it would still crash to desktop. When I changed the code to call it via the Hash instead of the name, it mysteriously worked fine.

Remember that all mods for GTA V are, by definition, unauthorized.

Rockstar can change stuff around at any time, and they do not provide us with an API...whereas RPH does. Use it to your advantage whenever possible.

Edited by Stealth22

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

6 hours ago, goigle said:

I'm feeling pretty lazy right now but you can just spawn blips in each color, take a screenshot, and look at the color of the pixels in the screenshot

EDIT: I should probably tag @alexguirre in this :P

 

Or you could all stop being noobs and look at the System.Drawing.Color MSDN documentation, each colour has it's ARGB hash value which you can deduce the integer value 0-255 from quite easily if you're not a total noob :P

Also you can just use Color.B which will return the value of the blue channel as a byte (0-255)
and obviously there is .A, .R and .G

For the noobs or the seriously bored, here's how to manually convert ARGB hashes to individual integers along with a little explanation of what I'm on about (honestly it's easier to just use a converter website or the .B method above but hey. Who doesn't love a bit of maths?):

Spoiler

ARGB hashes are hexadecimal (base 16, also known as 0 - F)

Example: the colour black has an ARGB value of #FF000000 and the colour blue has an ARGB value of #FF0000FF
ARGB stands for Alpha, Red, Green, Blue.

So lets take the hash for blue above (#FF0000FF), each "channel" has 2 digits so it's actually [FF][00][00][FF].
This means FULL alpha channel (FF = 255), no red, no green and full blue. This the result is an opaque full blue colour.
Now in this case it's very easy to determine what the integer values are as we don't have any confusion with in between values.
A = 255, R = 0, G = 0, B = 255.

You can of course plug each of the 2 digit hash codes into a hexadecimal to decimal converter for simplicity sake. But I'll show you how to work it out anyway for fun and because I really don't want to read a scientific paper for university yet.

Let's take a slightly more complex colour so we can show how to work it out.
Ah here's a good one. LimeGreen = #FF32CD32

So once again we have a full alpha channel of FF. Leaving us with RGB = 32CD32.

So how do we work this out. Well remember this is in hexadecimal not decimal. So 32 in hex is not 32 in dec. I'll show you how to work it out using the letters below, but the same principle applies to all parts of the hash.

Well counting from 0 to 9, gives you decimal. after 9, each number is represented with a letter up to F So A = 10, B = 11, C = 12, D = 13 etc.

So CD is 1213 then right luke? Literally yes. But in decimal no, so we need to convert it. To do this we multiply the values by 16 to the power of its place value, then add them together.
So we only have CD that's 2 place values. C is 1, D is 0 (if it was E7AD for example that would have 4 place values so E = 3, 7 = 2, A = 1, D = 0)
CD = (12x161)+(13x160) = 192 + 13 = 205.

And again remember the 32 is still in hexadecimal and needs converting too!
32 = (3x161)+(2x160) = 48 + 2 = 50

So ARGB of LimeGreen #FF32CD32 is
A = 255
R = 50
G = 205
B = 50

Voila.


 

Live Streaming daily from 8pm GMT (UK) at https://twitch.tv/OfficialLukeD - I play a variety of things 😄

Join my official discord server for support, general chat and my stream schedule! https://discord.gg/Mddj7PQ

I have the RGB values of the colors I was talking about so we don't have to use the natives:

  • Red:           R=224 G=50 B=50
  • Green:        R=114 G=204 B=114
  • Light Blue:  R=93 G=182 B=229
  • Yellow:       R=240 G=200 B=80
  • Orange:     R=234 G=142 B=80
  • Purple:       R=171 G=60 B=230

This is the image I used to get the colors:

blips.png.6fca788cf6ddb6414e31f58c9ad253

To compare with the colors you had set:
blips2.png.0c836056dd01ff0d3f1d6b3dad388

Edited by alexguirre
Added second image

It looks like they are darker shades of the colors that we picked...almost as if they took the "pure" colors, and turned down the opacity. The yellow and orange that R* selected look too close, IMO.

I don't know what you guys think, but I just released my stuff with the Drawing.Color values, so I wouldn't be able to change anything until the next release.

I think we're getting too granular with this, though. As long as we decide on a set of colors and stick to them, that's enough. They don't have to precisely match with whatever R* picked. Its not like we're integrating plugins with stock R* missions or anything.

Edited by Stealth22
Sorry...meant to say can't change anything UNTIL THE NEXT RELEASE :)

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.