Calculate the Blue percentage of a CS2 skin using its paint seed.
npm install csgo-blue-gem-calculator!NPM Version
!NPM Bundle Size
!NPM Downloads
!GitHub License
!GitHub Test Workflow Status
!GitHub Build Workflow Status
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.
In order to install the latest package version from
NPM, simply run:
``bash`
npm install csgo-blue-gem-calculator
There are just four simple methods, see the example below:
`js
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');
``
This package uses image pixel analysis to extract the number of blue pixels from each pattern.
The sites below all share the same Blue Gem percentage values, which can also be generated by this package:
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.