csgo-blue-gem-calculator
v0.0.3
Published
Calculate the Blue percentage of a CS2 skin using its paint seed.
Readme
CS2 Blue Gem Calculator
Calculate the Blue Gem percentage of a CS2 skin based on a given seed value. Supporting all Case Hardened skins and Heat Treated skins. Easily convert every paint seed (also called pattern index) into a Blue percentage value, or get a full list of all paint seeds and the corresponding Blue percentages.
🚀 Installation
In order to install the latest package version from NPM, simply run:
npm install csgo-blue-gem-calculator🛠 Usage
There are just four simple methods, see the example below:
const BlueGemCalculator = require('csgo-blue-gem-calculator');
// Get a complete list of all Blue percentages for all available items.
const fullList = BlueGemCalculator.getList('Case Hardened');
// Get a list of Blue percentages for the Karambit.
const karambitBluePercentages = BlueGemCalculator.getAllPercentages('Case Hardened', 'Karambit');
// Get the Blue percentage for the AK-47 and the seed 123.
const akBluePercentage = BlueGemCalculator.getPercentages('Case Hardened', 'AK-47', 123);
// Get all supported items.
const supportedItems = BlueGemCalculator.getSupportedItems('Case Hardened');📜 How It Works
This package uses image pixel analysis to extract the number of blue pixels from each pattern.
🌎 Platform Support
The sites below all share the same Blue Gem percentage values, which can also be generated by this package:
💻 Other Programming Languages
Are you not using Node, JavaScript, or TypeScript for your project? We have a pre-generated JSON file for you that contains the Blue percentages of all supported items. You can download it with any programming language into your project to store and process the values there.
Alternatively, feel free to check out the source code of this library and port it into your preferred language.
