This hardware-based Pulse-Width-Modulation (PWM) library enables you to use the Hardware-PWM on Arduino AVR ATtiny85-based boards (Digispark) using ATTinyCore. The Timer/Counter1 is used in asynchronous mode to give a PWM-output on Pin PB1 or Pin PB4 up to 500 kHz. The maximum resolution is 8-bit, the effective resolution typically between 7-bit and 8-bit.
Open up the Arduino Library Manager
in the Arduino IDE and search for DigiSpark_PWM. Select / install the the latest version. Click this badge for more detailed instructions.
Press the green clone or download button in the upper-right and download as .ZIP. Then go to the Arduino IDE and go to Sketch>Use Library->Add .ZIP Library_ and select the just downloaded zip file.