px-converter
TypeScript icon, indicating that this package has built-in type declarations

0.7.0 • Public • Published

px-converter

oclif Version Downloads/week License Build Status

Usage

$ npm install -g px-converter
$ px-converter COMMAND
running command...
$ px-converter (-v|--version|version)
px-converter/0.4.2 darwin-arm64 node-v16.17.0
$ px-converter --help [COMMAND]
USAGE
  $ px-converter COMMAND
...

Commands

px-converter from:pt [POINT]

Convert a given point (pt) value to the corresponding pixel value

USAGE
  $ px-converter from:pt [POINT]

ARGUMENTS
  POINT  Point to convert

OPTIONS
  -h, --help  show CLI help

EXAMPLE
  $ px-converter from:pt 12
  16px

See code: src/commands/from/pt.ts

px-converter from:rem [REM]

Convert a given rem value to the corresponding pixel value

USAGE
  $ px-converter from:rem [REM]

ARGUMENTS
  REM  Rem to convert

OPTIONS
  -b, --base=base  [default: 16] Base pixel
  -h, --help       show CLI help

EXAMPLE
  $ px-converter from:rem 2
  32px

See code: src/commands/from/rem.ts

px-converter help [COMMAND]

display help for px-converter

USAGE
  $ px-converter help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

px-converter joules

Take mass and height as input and returns the potential energy in Joules

USAGE
  $ px-converter joules

OPTIONS
  -h, --help  show CLI help

EXAMPLE
  $ px-converter joules
  ? Specify the mass in Kg: 0.249
  ? Specify the height from the ground in meters: 50
  An object with mass of 0.249Kg from an height of 50 meters, will generate 122.0928 Joules

See code: src/commands/joules.ts

px-converter table:pt

Return a table of conversions between pixels and points

USAGE
  $ px-converter table:pt

OPTIONS
  -h, --help         show CLI help
  -r, --range=range  [default: 10,42] Range of pixels

EXAMPLE
  $ px-converter table:pt
  Pixel     Point
  10px      7.5pt
  11px      8.25pt
  12px      9pt
  ...

See code: src/commands/table/pt.ts

px-converter table:rem [BASEPIXEL]

Return a table of conversions between pixels and rems, if no BASEPIXEL value is passed, it will default to 16 pixels

USAGE
  $ px-converter table:rem [BASEPIXEL]

ARGUMENTS
  BASEPIXEL  Base Pixel

OPTIONS
  -b, --base=base    [default: 16] Base pixel
  -h, --help         show CLI help
  -r, --range=range  [default: 10,42] Range of pixels

EXAMPLE
  $ px-converter table:rem
  Pixel     Rem
  10px      0.625rem
  11px      0.6875rem
  12px      0.75rem
  ...

See code: src/commands/table/rem.ts

px-converter to:pt [PIXEL]

Convert a given pixel value to the corresponding point value

USAGE
  $ px-converter to:pt [PIXEL]

ARGUMENTS
  PIXEL  Pixel to convert

OPTIONS
  -h, --help  show CLI help

EXAMPLE
  $ px-converter to:pt 16
  12pt

See code: src/commands/to/pt.ts

px-converter to:rem [PIXEL]

Convert a given pixel value to the corresponding rem value

USAGE
  $ px-converter to:rem [PIXEL]

ARGUMENTS
  PIXEL  Pixel to convert

OPTIONS
  -b, --base=base  [default: 16] Base pixel
  -h, --help       show CLI help

EXAMPLE
  $ px-converter to:rem 16
  1rem

See code: src/commands/to/rem.ts

px-converter to:rgb [HEX]

Convert a given hex value to the corresponding rgb value

USAGE
  $ px-converter to:rgb [HEX]

ARGUMENTS
  HEX  Hex value

OPTIONS
  -h, --help  show CLI help

EXAMPLE
  $ px-converter to:rgb FFFFFF
  rgb(255,255,255)

See code: src/commands/to/rgb.ts

Readme

Keywords

Package Sidebar

Install

npm i px-converter

Weekly Downloads

1

Version

0.7.0

License

MIT

Unpacked Size

23.4 kB

Total Files

30

Last publish

Collaborators

  • darkmavis1980