Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sonne

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sonne

  • 0.0.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Logo

Sonne.rb

Sonne.rb: Ruby port of Sonne.

Features

Setup

All the features in Sonne, the Python library, will be added to Sonne.rb as soon as possible.

gem install sonne

Documentation

Text

Sonne.rb has a Text function that you can use wherever strings are accepted and customize it with parameters.

Example usage:

require "sonne"

x = Sonne.Text("Hello, World!", fg: "blue", bg: "white", style: "italic")
puts x

This will print colored and styled Hello, World! in the terminal.

Also you can use like this:

require "sonne"

x = Sonne.Text("Hello,", "World!", fg: "blue", bg: "white", style: "italic")
puts x

This will also print colored and styled Hello, World! in the terminal.

Tree

Sonne.rb has a Tree function which can generate a customizable tree view.

Example usage:

require "sonne"

x = ["A", ["B", ["C"], ["D"]]]

Sonne.Tree(x, 0, true)

Output:

┗━━ A
    ┃━━ B
        ┗━━ C
    ┗━━ D

Other Functions

clear(): Clears the terminal screen.

typewrite(*text, duration): Prints strings with typewriter effect.

Styles

A list of Text styles in Sonne.rb.

NameNumber
normal0
bold1
italic3
underlined4
reversed7
hidden8
strike9

Colors

A list of the 8-bit Text colors in Sonne.rb.

NameNumber
black0
red1
green2
yellow3
blue4
magenta5
cyan6
white7
brightblack8
brightred9
brightgreen10
brightyellow11
brightblue12
brightmagenta13
brightcyan14
brightwhite15
grey016
gray016
navyblue17
darkblue18
blue320
blue121
darkgreen22
deepskyblue425
dodgerblue326
dodgerblue227
green428
springgreen429
turquoise430
deepskyblue332
dodgerblue133
green340
springgreen341
darkcyan36
lightseagreen37
deepskyblue238
deepskyblue139
springgreen247
cyan343
darkturquoise44
turquoise245
green146
springgreen148
mediumspringgreen49
cyan250
cyan151
darkred88
deeppink4125
purple455
purple356
blueviolet57
orange494
grey3759
gray3759
mediumpurple460
slateblue362
royalblue163
chartreuse464
darkseagreen471
paleturquoise466
steelblue67
steelblue368
cornflowerblue69
chartreuse376
cadetblue73
skyblue374
steelblue181
palegreen3114
seagreen378
aquamarine379
mediumturquoise80
chartreuse2112
seagreen283
seagreen185
aquamarine1122
darkslategray287
darkmagenta91
darkviolet128
purple129
lightpink495
plum496
mediumpurple398
slateblue199
yellow4106
wheat4101
grey53102
gray53102
lightslategrey103
lightslategray103
mediumpurple104
lightslateblue105
darkolivegreen3149
darkseagreen108
lightskyblue3110
skyblue2111
darkseagreen3150
darkslategray3116
skyblue1117
chartreuse1118
lightgreen120
palegreen1156
darkslategray1123
red3160
mediumvioletred126
magenta3164
darkorange3166
indianred167
hotpink3168
mediumorchid3133
mediumorchid134
mediumpurple2140
darkgoldenrod136
lightsalmon3173
rosybrown138
grey63139
gray63139
mediumpurple1141
gold3178
darkkhaki143
navajowhite3144
grey69145
gray69145
lightsteelblue3146
lightsteelblue147
yellow3184
darkseagreen2157
lightcyan3152
lightskyblue1153
greenyellow154
darkolivegreen2155
darkseagreen1193
paleturquoise1159
deeppink3162
magenta2200
hotpink2169
orchid170
mediumorchid1207
orange3172
lightpink3174
pink3175
plum3176
violet177
lightgoldenrod3179
tan180
mistyrose3181
thistle3182
plum2183
khaki3185
lightgoldenrod2222
lightyellow3187
grey84188
gray84188
lightsteelblue1189
yellow2190
darkolivegreen1192
honeydew2194
lightcyan1195
red1196
deeppink2197
deeppink1199
magenta1201
orangered1202
indianred1204
hotpink206
darkorange208
salmon1209
lightcoral210
palevioletred1211
orchid2212
orchid1213
orange1214
sandybrown215
lightsalmon1216
lightpink1217
pink1218
plum1219
gold1220
navajowhite1223
mistyrose1224
thistle1225
yellow1226
lightgoldenrod1227
khaki1228
wheat1229
cornsilk1230
grey100231
gray100231
grey3232
gray3232
grey7233
gray7233
grey11234
gray11234
grey15235
gray15235
grey19236
gray19236
grey23237
gray23237
grey27238
gray27238
grey30239
gray30239
grey35240
gray35240
grey39241
gray39241
grey42242
gray42242
grey46243
gray46243
grey50244
gray50244
grey54245
gray54245
grey58246
gray58246
grey62247
gray62247
grey66248
gray66248
grey70249
gray70249
grey74250
gray74250
grey78251
gray78251
grey82252
gray82252
grey85253
gray85253
grey89254
gray89254
grey93255
gray93255

FAQs

Package last updated on 17 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc