{"id":19374001,"url":"https://github.com/akashrchandran/rayso","last_synced_at":"2025-08-08T06:32:34.718Z","repository":{"id":37841026,"uuid":"506311307","full_name":"akashrchandran/rayso","owner":"akashrchandran","description":"This is unofficial NodeJs (JavaScript) API for ray.so that turns your code into beautiful images. Choose from a range of syntax colors, hide or show the background, and toggle between a dark and light window.","archived":false,"fork":false,"pushed_at":"2024-07-06T03:23:09.000Z","size":58,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-01T12:06:17.582Z","etag":null,"topics":["code","codescreenshot","prettier","rayso","screenshot"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/rayso","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akashrchandran.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-22T15:48:00.000Z","updated_at":"2024-07-06T03:23:12.000Z","dependencies_parsed_at":"2024-03-08T07:23:42.201Z","dependency_job_id":"afeb5143-436b-43f3-ae0d-82a54c26f58f","html_url":"https://github.com/akashrchandran/rayso","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akashrchandran%2Frayso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akashrchandran%2Frayso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akashrchandran%2Frayso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akashrchandran%2Frayso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akashrchandran","download_url":"https://codeload.github.com/akashrchandran/rayso/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229097379,"owners_count":18019735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code","codescreenshot","prettier","rayso","screenshot"],"created_at":"2024-11-10T08:33:48.093Z","updated_at":"2025-08-08T06:32:34.709Z","avatar_url":"https://github.com/akashrchandran.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ray.so API\n\n[![version](https://badgen.net/npm/v/rayso)](https://npmjs.com/package/rayso)\n[![downloads](https://badgen.net/npm/dm/rayso)](https://www.npmjs.com/package/rayso)\n[![author on telegram](https://img.shields.io/badge/Author%20on%20-Telegram-blue)](https://t.me/akashrchandran)\n\n[![logotype](https://i.ibb.co/vz8DtqL/rayso-api-preview.png)](https://npmjs.com/package/rayso)\n\nThis is unofficial NodeJs (JavaScript) API for [ray.so](https://ray.so) that turns your code into beautiful images. Choose from a range of syntax colors, hide or show the background, and toggle between a dark and light window.\n\n\u003e [!NOTE]\n\u003e This is a fork of the project [rayso-api](https://github.com/s0ftik3/rayso-api/) developed by [s0ftik3](https://github.com/s0ftik3/), which is no longer maintained. I have updated the project to work with the latest version of the ray.so.\n\n## Navigation\n\n-   [Installing](#installing)\n-   [Usage](#usage)\n-   [Parameters](#parameters)\n-   [Examples](#examples)\n    -   [Default](#default-output)\n    -   [Custom](#custom-parameters)\n    -   [No Background](#output-without-background)\n-   [Themes](#themes)\n    -   [Candy](#candy)\n    -   [Crimson](#crimson)\n    -   [Falcon](#falcon)\n    -   [Meadow](#meadow)\n    -   [Midnight](#midnight)\n    -   [Raindrop](#raindrop)\n    -   [Sunset](#sunset)\n-   [Credits](#credits)\n\n## Installing\n\n```bash\n$ npm i rayso\n```\n\n## Usage\n\n```javascript\nimport RaySo from 'rayso'\nconst raySo = new RaySo({\n    // parameters, if you want to customize the output\n    // you'll find detailed info about parameters below\n})\n\nraySo\n    .cook(`console.log('Hello, World!');`)\n    .then(response =\u003e {\n        // response is image buffer\n    })\n    .catch(err =\u003e {\n        console.error(err)\n    })\n```\n\n```javascript\nimport RaySo from 'rayso'\nconst raySo = new RaySo()\n```\n\n## Parameters\n\n| Parameter          | Default value      | Type             | Description                                                                                                                                    |\n|--------------------|--------------------|------------------|------------------------------------------------------------------------------------------------------------------------------------------------|\n| `width`            | `\"\" (auto-sized)`  | String or Number | Sets the image width in pixels. Accepts numbers (e.g., `700`) or strings with digits (e.g., `\"700\"`). Value must be between 520 and 920. Defaults to auto-sizing if omitted or empty. |\n| `title `           | `\"Untitled-1\"`     | String           | The title will be displayed on top of the code box.                                                                                            |\n| `theme`            | `\"breeze\"`         | String           | There are several options of how your box will look like. Available themes: breeze, candy, crimson, falcon, meadow, midnight, raindrop, sunset |\n| `background`       | `true`             | Boolean          | If disabled, it will create an image of code box only, without background.                                                                     |\n| `darkMode`         | `true`             | Boolean          | If disabled, it will change your theme to its light version.                                                                                   |\n| `padding`          | `32`               | String or Number | Distance between borders and code box. Available values: 16, 32, 64 and 128.                                                                   |\n| `language`         | `\"auto\"`           | String           | You better leave it auto :/ However, you can try to pass some language name and if it worked, good for you!                                    |\n| `localPreview`     | `false`            | Boolean          | If enabled, it will create example.png image file of the output in the current directory.                                                      |\n| `localPreviewPath` | `current directory` | String           | Path to create example files. MacOS, Linux and Windows paths supported.                                                                        |\n| `debug`            | `false`            | Boolean          | If enabled, it will show messages in the console during code execution.                                                                        |\n\n## Examples\n\n### Default output\n\n```javascript\nimport RaySo from 'rayso'\nconst raySo = new RaySo()\n```\n\n[![output](https://i.ibb.co/Vv9rD4H/default.png)](https://npmjs.com/package/rayso)\n\n### Custom parameters\n\n```javascript\nimport RaySo, {\n    CardTheme,\n    CardPadding,\n    CardProgrammingLanguage,\n} from 'rayso'\nconst raySo = new RaySo({\n    width: 750,\n    title: 'Custom Title',\n    theme: CardTheme.CANDY,\n    padding: CardPadding.md,\n    language: CardProgrammingLanguage.JS,\n    debug: true,\n    localPreview: true,\n    localPreviewPath: '/Users/akashrchandran/rayso_screenshots',\n})\n```\n\n[![output](https://i.ibb.co/Px9C24J/custom.png)](https://npmjs.com/package/rayso)\n\n### Output without background\n\n```javascript\nimport RaySo from 'rayso'\nconst raySo = new RaySo({ background: false })\n```\n\n[![output](https://i.ibb.co/qspMB4t/no-Background.png)](https://npmjs.com/package/rayso)\n\n## Themes\n\nThese are all the available themes, so far. As soon Ray.So has a new theme, it will appear here. Default theme `breeze` is not listed here, you saw it in the first picture of this README.\n\n\n### Breeze\n\n```javascript\nimport RaySo from 'rayso'\nconst raySo = new RaySo({ theme: 'breeze' })\n```\n\n[![breeze](https://i.ibb.co/0mwBr3Z/breeze.png)](https://npmjs.com/package/rayso)\n\n\n### Mono\n\n```javascript\nimport RaySo from 'rayso'\nconst raySo = new RaySo({ theme: 'mono' })\n```\n\n[![mono](https://i.ibb.co/tLrHn9M/mono.png)](https://npmjs.com/package/rayso)\n\n### Candy\n\n```javascript\nimport RaySo from 'rayso'\nconst raySo = new RaySo({ theme: 'candy' })\n```\n\n[![candy](https://i.ibb.co/pQnX6pw/candy.png)](https://npmjs.com/package/rayso)\n\n### Crimson\n\n```javascript\nimport RaySo from 'rayso'\nconst raySo = new RaySo({ theme: 'crimson' })\n```\n\n[![crimson](https://i.ibb.co/qkYB36S/crimson.png)](https://npmjs.com/package/rayso)\n\n### Falcon\n\n```javascript\nimport RaySo from 'rayso'\nconst raySo = new RaySo({ theme: 'falcon' })\n```\n\n[![falcon](https://i.ibb.co/w7KdqR5/falcon.png)](https://npmjs.com/package/rayso)\n\n### Meadow\n\n```javascript\nimport RaySo from 'rayso'\nconst raySo = new RaySo({ theme: 'meadow' })\n```\n\n[![meadow](https://i.ibb.co/xJnMc10/meadow.png)](https://npmjs.com/package/rayso)\n\n### Midnight\n\n```javascript\nimport RaySo from 'rayso'\nconst raySo = new RaySo({ theme: 'midnight' })\n```\n\n[![midnight](https://i.ibb.co/4jng8Fs/midnight.png)](https://npmjs.com/package/rayso)\n\n### Raindrop\n\n```javascript\nimport RaySo from 'rayso'\nconst raySo = new RaySo({ theme: 'raindrop' })\n```\n\n[![raindrop](https://i.ibb.co/jbjYcVf/raindrop.png)](https://npmjs.com/package/rayso)\n\n### Sunset\n\n```javascript\nimport RaySo from 'rayso'\nconst raySo = new RaySo({ theme: 'sunset' })\n```\n\n[![sunset](https://i.ibb.co/Q8rFCVn/sunset.png)](https://npmjs.com/package/rayso)\n\n\u003e [!NOTE]\n\u003e There are more themes available, please check [option.js](https://github.com/akashrchandran/rayso/blob/main/src/entities/options.js) file to see the entire list.\n\n## Credits\n\n-   The source is [ray.so](https://ray.so) website.\n-  [s0ftik3](https://github.com/s0ftik3/) for the original project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakashrchandran%2Frayso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakashrchandran%2Frayso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakashrchandran%2Frayso/lists"}