This repository has been archived by the owner on May 6, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Added - Implemented `Palette.Nearest` method, which returns the nearest colour in a palette to a given colour. - Implemented `LAB.Lerp` method, which returns a colour between two colours in the LAB colour space. - Missing TypeScript types for new methods and `Hex.fromHexRGBA`. - CI workflow to ensure code is formatted and linted correctly. ### Fixed - Due to a typo, the `APCA.GetContrastRatio` method was throwing an error when attempting to calculate the contrast ratio for certain colours. ### Changed All deprecated methods will output warnings to the console when used for the first time. This is to help users migrate to the new methods. - This project's toolchain is now managed by aftman. Use of foreman is not recommended. - All instances of the word "colour" have been changed to "color" to match the US spelling and keep consistency with the Roblox API. - `ColorUtils.Emphasise` and `ColorUtils.GetContrastingColour` are now marked as deprecated for the same reason as above. - `ColorUtils.GetContrastingColor` is now marked as deprecated. The `WCAG` submodule should be used instead, since both `APCA` and `WCAG` provide two different methods for calculating contrast ratio. - `ColorUtils.GetContrastRatio` is now marked as deprecated and implements a compatibility layer. Previously this was a redirect to `WCAG.GetContrastRatio` but now it will use `APCA.GetContrastRatio` because it is more accurate. `WCAG` values (`0-21`) will be returned for backwards compatibility until the method is removed in a future release. - `Palette.Tailwind` will now produce a darker 950 shade, in line with [Tailwind v3.3.2](https://tailwindcss.com/docs/customizing-colors). Note that the generated palette will be slightly different to tailwind's, since the algorithm used to generate the palette is different.
- Loading branch information
Showing
115 changed files
with
1,043 additions
and
665 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize, ready_for_review] | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
name: Test and Build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Aftman | ||
uses: ok-nick/[email protected] | ||
|
||
- name: Install Packages | ||
run: wally install | ||
|
||
- name: Build | ||
run: rojo build default.project.json -o test.rbxm | ||
|
||
- name: Set Environment Variables | ||
run: | | ||
echo "COMMIT_HASH=$(git rev-parse --short ${{github.sha}})" >> $GITHUB_ENV | ||
- name: Upload Build Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{github.event.repository.name}}-${{env.COMMIT_HASH}}.rbxm | ||
path: test.rbxm | ||
|
||
lint: | ||
name: Format and Lint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Aftman | ||
uses: ok-nick/[email protected] | ||
|
||
- name: Format | ||
run: stylua --check src/ | ||
|
||
- name: Lint | ||
run: selene src/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
name: Publish Package | ||
|
||
env: | ||
ASSET_ID_STABLE: 6573728888 | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
|
@@ -14,39 +11,19 @@ jobs: | |
timeout-minutes: 8 | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
# - name: Test Roblox Login Tokens | ||
# shell: bash | ||
# run: | | ||
# if [ -z "${{ secrets.ROBLOSECURITY }}" ]; then | ||
# echo "No cookie found. Please set the ROBLOSECURITY secret." | ||
# exit 1 | ||
# fi | ||
|
||
# RBX_USERNAME=$(curl -s -X GET -H "Cookie: .ROBLOSECURITY=${{ secrets.ROBLOSECURITY }}" https://users.roblox.com/v1/users/authenticated | jq -r ".name") | ||
|
||
# if [ -z "$RBX_USERNAME" ]; then | ||
# echo "ROBLOSECURITY is invalid or expired. Please reset the ROBLOSECURITY secret." | ||
# exit 1 | ||
# fi | ||
|
||
# echo "Logged in as $RBX_USERNAME." | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Node LTS | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: Setup Toolchain | ||
uses: Roblox/setup-foreman@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Setup Aftman | ||
uses: ok-nick/[email protected] | ||
|
||
- name: Report Tool Versions | ||
run: | | ||
foreman list | ||
aftman list | ||
npm -v | ||
node -v | ||
|
@@ -59,11 +36,6 @@ jobs: | |
run: | | ||
find . -name "*.spec.lua" -delete | ||
# - name: Publish to Roblox | ||
# if: ${{ github.event.release.prerelease == false }} | ||
# shell: bash | ||
# run: rojo upload default.project.json --asset_id $ASSET_ID_STABLE --cookie "${{ secrets.ROBLOSECURITY }}" | ||
|
||
- name: Publish to Wally | ||
if: ${{ github.event.release.prerelease == false }} | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,16 +2,13 @@ name: Create GitHub Release | |
|
||
on: | ||
workflow_dispatch: | ||
branches: | ||
- default | ||
|
||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Ensure Wally+NPM Version Numbers Match | ||
run: | | ||
|
@@ -33,14 +30,11 @@ jobs: | |
exit 1 | ||
fi | ||
- name: Setup Toolchain | ||
uses: Roblox/setup-foreman@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
version: "^1.0.1" | ||
- name: Setup Aftman | ||
uses: ok-nick/[email protected] | ||
|
||
- name: Report Tool Versions | ||
run: foreman list | ||
run: aftman list | ||
|
||
- name: Get Release Details | ||
shell: bash | ||
|
@@ -55,12 +49,17 @@ jobs: | |
run: wally install | ||
|
||
- name: Remove Tests | ||
run: | | ||
find . -name "*.spec.lua" -delete | ||
run: find . -name "*.spec.lua" -delete | ||
|
||
- name: Build Project | ||
run: rojo build default.project.json -o $RELEASE_FILENAME | ||
|
||
- name: Upload Build Artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.RELEASE_FILENAME }} | ||
path: ${{ env.RELEASE_FILENAME }} | ||
|
||
- name: Create GitHub Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
*.rbx* | ||
sourcemap.json | ||
|
||
roblox.toml | ||
testez.toml | ||
|
||
node_modules/ | ||
*.tsbuildinfo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
stylua --check src/ | ||
selene src/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"MD033": false | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[sort_requires] | ||
enabled = true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
$FILE_NAME = "test-place" | ||
|
||
foreman install | ||
aftman install | ||
rojo build .\test.project.json -o ".\$FILE_NAME.rbxl" | ||
run-in-roblox --place ".\$FILE_NAME.rbxl" --script ".\test-runner.server.lua" | ||
Remove-Item -Force ".\$FILE_NAME.rbxl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
{ | ||
"robloxLsp.diagnostics.severity": { | ||
"unused-local": "Error", | ||
"unused-function": "Error", | ||
"unused-vararg": "Error", | ||
"duplicate-index": "Error" | ||
} | ||
"[lua]": { | ||
"editor.defaultFormatter": "JohnnyMorganz.stylua", | ||
"editor.formatOnSave": true | ||
}, | ||
"debug.toolBarLocation": "hidden" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.