Skip to content

NMSCD/nmscolorparser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NMS Color Parser

https://nmscd.github.io/nmscolorparser/

This mini app reads the exml files and shows the colors of each property visually. The number represents the index of that color in their parent property.

Example:

Supported files:

  • LEGACYBASECOLOURPALETTES
  • BASECOLOURPALETTES
  • WATERCOLOURS
  • SPACERARESKYCOLOURS
  • SPACESKYCOLOURS
  • DAYSKYCOLOURS
  • DAYSKYCOLOURS_FIRESTORM
  • DAYSKYCOLOURS_GRAVSTORM
  • DUSKSKYCOLOURS
  • NIGHTSKYCOLOURS

How to convert the color values of NMS properties:

<Property value="Colour.xml">
  <Property name="R" value="0.7839" />
  <Property name="G" value="0.41184" />
  <Property name="B" value="0.02691" />
  <Property name="A" value="1" />
</Property>

Multiply the value by 255 and round it.

R = Math.round(0.7839 * 255); // result: 200