• Print

Author Topic: Default tsay colour?  (Read 5901 times)

0 Members and 1 Guest are viewing this topic.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Default tsay colour?
« on: September 11, 2016, 07:48:59 am »
Just wondering, what is the default colour for things like tsay? It's sort of a blue-ish (teal?) colour, but I was wondering what it was to make everything consistent in this script I'm writing.


EDIT: If I'm correct, it's the same colour that Garry's Mod uses for server messages (like this example?)
« Last Edit: September 11, 2016, 07:52:23 am by iViscosity »
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Default tsay colour?
« Reply #1 on: September 11, 2016, 08:24:03 am »
ULib.tsay uses ChatPrint for client consoles, and Msg for server. (Code block found here)
As far as I can find, we don't touch those colors, so you'd need to look up Gmod source code somewhere.

ULib.tsayError uses ULib.tsayColor, with color specified as a red Color( 255, 140, 39 )
(Code block found here)
ULib.tsayColor seems to default to 128, 128, 128 (white?) if no parameters are passed as expected.

Simplest answer - use Chatprint for client and Msg for server and you'll be color matched automatically.
« Last Edit: September 11, 2016, 08:28:13 am by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Default tsay colour?
« Reply #2 on: September 11, 2016, 08:29:12 am »
The thing is, I was trying to use tsayColor to show how much health someone has left, and I wanted the health to be green while all the rest was the same colour... but I can't figure out what the colour is.
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Default tsay colour?
« Reply #3 on: September 11, 2016, 11:27:10 am »
What do you mean "you can't figure out what the color is"? If you want to print a message with a green portion using tsayColor, you'd do the following:

Code: Lua
  1. ULib.tsayColor(ply, false, Color(255,255,255), "my white message ", Color(0,255,0), "my green message ", Color(255,255,255), "more white")
Experiencing God's grace one day at a time.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Default tsay colour?
« Reply #4 on: September 11, 2016, 11:34:50 am »
What do you mean "you can't figure out what the color is"? If you want to print a message with a green portion using tsayColor, you'd do the following:

Code: Lua
  1. ULib.tsayColor(ply, false, Color(255,255,255), "my white message ", Color(0,255,0), "my green message ", Color(255,255,255), "more white")

When you first use tsay, it has a blue-ish colour to it, and once I change the colour of the health, I want it to change back to that blue-ish colour, but I can't unless I know the rgb for it.


That type of blue, like it's from the server, I was wondering what the specific value was for that.


If you were to just use ULib.tsay, it prints in a blue-ish colour, right? That's the colour I'm looking for the R,G,B for.
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Default tsay colour?
« Reply #5 on: September 11, 2016, 11:38:35 am »
I see. I determined the color by taking a screenshot of the default text color and inspecting it with Paint. I'm pretty sure the RGB values are 151 211 255. At least, that's what I'm using for the logging color -- see the top of log.lua in ULX.
Experiencing God's grace one day at a time.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Default tsay colour?
« Reply #6 on: September 11, 2016, 11:39:55 am »
Alright. I'll try that out and let you know.


EDIT: I can't tell for 100% sure that it is right, but it sure looks like it. Thanks
« Last Edit: September 11, 2016, 11:41:52 am by iViscosity »
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Default tsay colour?
« Reply #7 on: September 11, 2016, 12:12:20 pm »
If it's the wrong color, you are at least using the same wrong color ULX uses. ;)
Experiencing God's grace one day at a time.

  • Print