Skip to content

Commit

Permalink
Release v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
docelic committed May 23, 2021
1 parent defe2b0 commit 3435137
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Add the dependency to `shard.yml`:
dependencies:
term_colors:
github: crystallabs/term_colors
version: 0.1.2
version: 1.0.0
```

## Available functions
Expand Down
6 changes: 3 additions & 3 deletions shard.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: term_colors
version: 0.1.2
version: 1.0.0

authors:
- Davor Ocelic <docelic@crystallabs.io>

crystal: 0.35.1
crystal: 1.0.0

license: MIT
license: AGPLv3
4 changes: 2 additions & 2 deletions spec/term_colors_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ describe TermColors do
obj = ClsColors.new
obj.blend(7, 11, 1).should eq 11
obj.blend(34, 213, 0.1).should eq 34
obj.blend(nil, 213, 0.5).should eq 96
obj.blend(34, nil, 0.5).should eq 22
obj.blend(0, 213, 0.5).should eq 96
obj.blend(34, 0, 0.5).should eq 22
end
it "can convert colors" do
obj = ClsColors.new
Expand Down
4 changes: 2 additions & 2 deletions src/term_colors.cr
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# TODO: Add TrueColor functionality
module TermColors
VERSION = "0.1.2"
VERSION = "1.0.0"

# Storage cache for `#match` method
CACHE_MATCH = {} of Int32 => Int32
Expand Down Expand Up @@ -245,7 +245,7 @@ module TermColors

# Blends two attributes together, taking into account alpha/transparency value.
# Both the background and the foreground attributes are blended.
def blend(attr=0, attr2=0, alpha : Float = 0.5)
def blend(attr=0, attr2=0, alpha : Float | Int = 0.5)
# First blend background
bg = attr & 0x1ff
if !attr2.nil?
Expand Down

0 comments on commit 3435137

Please sign in to comment.